package com.chens.utils;

import java.security.SecureRandom;
import java.util.Base64;

/**
 * 生成JWT密钥
 */
public class KeyGeneratorUtil {
    public static void main(String[] args) {
        SecureRandom secureRandom = new SecureRandom();
        byte[] key = new byte[256]; // 256位密钥
        secureRandom.nextBytes(key);
        String base64Key = Base64.getEncoder().encodeToString(key);
        System.out.println("JWT Secret: " + base64Key);
    }
}